package day04;

import java.util.Scanner;

public class BiaoZhunLianXi04 {
    public static void main(String[] args) {
        //练习一
        Scanner sc = new Scanner(System.in);
    /*    System.out.println("请选择功能：1取款2存款3查余额4退卡");
        int command= sc.nextInt();
        switch(command){
            case 1:
                System.out.println("取款");
                break;
            case 2:
                System.out.println("存款");
                break;
            case 3:
                System.out.println("查询余额");
                break;
            case 4:
                System.out.println("退卡");
                break;
            default:
                System.out.println("输入错误");
        }
        //练习二
    /*    int num =(int)(Math.random()*1000+1);
        System.out.println("猜数字");
        int guess = sc.nextInt();
        while(guess!=num){
            if (guess>num){
                System.out.println("太大了");
            }else{
                System.out.println("太小了");
            }
            System.out.println("继续");
            guess = sc.nextInt();
        }
        System.out.println("恭喜你猜对了");

     */

        //练习三
    /*    int num = (int)(Math.random()*1000+1);
        int guess;
        do {
            System.out.println("猜数字");
            guess = sc.nextInt();
            if (guess>num){
                System.out.println("太大了");
            }else if (guess<num){
                System.out.println("太小了");
            }else{
                System.out.println("猜对了");
            }
        }while (guess !=num);

     */


        //练习四
        /*
        for(int times =0; times<5;times++){
            System.out.println("行动是成功的阶梯");
        }

        for (int num =1 ;num<=9;num++){
            System.out.println(num+"*9="+num*9);
        }
        for (int num=1;num<=9;num+=2){
            System.out.println(num+"*9="+num*9);
        }

        int  sum =  0;
        for (int i=1;i<=100;i++){
            sum = sum+1;
        }
        System.out.println("sum+"+sum);
        */

        System.out.println("请选择功能：1取款2存款3查余额4退卡");
        int command= sc.nextInt();
        switch(command){
            case 1:
                System.out.println("取款");
                break;
            case 2:
                System.out.println("存款");
                break;
            case 3:
                System.out.println("查询余额");
                break;
            case 4:
                System.out.println("退卡");
                break;
            default:
                System.out.println("输入错误");
        }
        //练习二
    /*    int num =(int)(Math.random()*1000+1);
        System.out.println("猜数字");
        int guess = sc.nextInt();
        while(guess!=num){
            if (guess>num){
                System.out.println("太大了");
            }else{
                System.out.println("太小了");
            }
            System.out.println("继续");
            guess = sc.nextInt();
        }
        System.out.println("恭喜你猜对了");

     */

        //练习三
    /*    int num = (int)(Math.random()*1000+1);
        int guess;
        do {
            System.out.println("猜数字");
            guess = sc.nextInt();
            if (guess>num){
                System.out.println("太大了");
            }else if (guess<num){
                System.out.println("太小了");
            }else{
                System.out.println("猜对了");
            }
        }while (guess !=num);

     */


        //练习三

        for(int times =0; times<5;times++){
            System.out.println("行动是成功的阶梯");
        }

        for (int num =1 ;num<=9;num++){
            System.out.println(num+"*9="+num*9);
        }
        for (int num=1;num<=9;num+=2){
            System.out.println(num+"*9="+num*9);
        }

        int  sum =  0;
        for (int i=1;i<=100;i++){
            sum = sum+1;
        }
        System.out.println("sum+"+sum);
    }
}
